package customer.zspt.cn.customer.components.order.orderVp;

import android.app.Activity;
import android.view.View;
import android.widget.LinearLayout;

import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;

import customer.zspt.cn.customer.R;
import customer.zspt.cn.customer.bean.OrderMsgDao;
import customer.zspt.cn.customer.Widget.OrderContentItemView;

/**
 * Created by Administrator on 2018/7/18 0018.
 */

public class OrderThirdVpItem extends BaseVpItem{
    //vp第三個頁面
    @ViewInject(R.id.tr_ll)
    private LinearLayout tr_ll;
    private View view;

    public OrderThirdVpItem(Activity activity, OrderMsgDao.OrderMsg orderMsg, String guserid) {
        super(activity, orderMsg, guserid);
    }

    @Override
    public View initView() {
        view = View.inflate(mActivity, R.layout.order_view_vp_tr,null);
        ViewUtils.inject(this,view);
        return view;
    }

    @Override
    public void initData() {
        addFromView();
    }

    //添加來源
    private void addFromView()
    {
        tr_ll.removeAllViews();
        OrderContentItemView scFrom = new OrderContentItemView(mActivity);
        scFrom.setTitle("來源");
        scFrom.setContent("");
        tr_ll.addView(scFrom);
        OrderContentItemView scUserName = new OrderContentItemView(mActivity);
        scUserName.setTitle("用戶");
        scUserName.setContent(mOrderMsg.orderUsername);
        tr_ll.addView(scUserName);
    }
}
